package org.wattdepot.cli.commands;

import java.util.List;

/**
 * An abstract class that defines the bare minimum that a command from the command line will do.
 * 
 * @author David Mau
 */
public abstract interface WattDepotCliCommand {
  /** The URL to the public WattDepot Server. */
  static String debug = "http://server.wattdepot.org:8182/wattdepot/";
  /** Carriage return on this operating system. */
  static String cr = System.getProperty("line.separator");
  
  // Error messages
  /** Too many arguments error message. */
  static String tooManyArguments = "Too many arguments.";
  /** Server connection error message. */
  static String serverConnectionError = "Can't connect to server.  Error: ";
  /** Missing arguments error message. */
  static String missingArguments = "Missing arguments.";
  /** Bad time stamp input by user error message. */
  static String badTimeStamp = "Bad timestamp.  Error: ";
  /** Not authorized to view source error message. */
  static String notAuthorized = "Not authorized to view source.  Error: ";
  /** Resource not found error message. */
  static String resourceNotFound = "Invalid source.  Error: ";
  /** Bad XML returned error message. */
  static String badXml = "Bad XML returned.  Error: ";
  /** Miscellaneous server error message. */
  static String miscClient = "Server problem.  Error: ";
  /** No sensor data error message. */
  static String noSensorData = "No sensor data.";
  /** Interval given by the user is not a number error message. */
  static String intervalNotNumber = "Interval input is not a number.  Error: ";
  /** Interval given by the user is zero or negative error message. */
  static String intervalNegativeOrZero = "Interval input requires a positive, non-zero integer.";
  /** Invalid input for carbon or energy choice error message. */
  static String carbonOrEnergy = "Please choose either carbon or energy to analyze.";
  /** Invalid input for min, max, or average choice error message. */
  static String minOrMaxOrAverage = "Please choose either min, max, or average as the statistic.";
  /** Invalid input for generated or consumed. */
  static String generatedOrConsumed = "Please choose either power generated or consumed.";
  /** Invalid input for a file name. */
  static String badFile = "Bad file.  Error: ";
  /** Error message for end date being before the start date. */
  static String endDateBeforeStartDate = "End date given is before start date given.";
  /** Error message for providing a fuelType that wasn't found in the sources searched through. */
  static String fuelTypeNotFound = "Fuel type not found in source or it's children.";
  /** Invalid input for min or max choice error message. */
  static String minOrMax = "Please choose either min or max as the statistic.";
  /** Closing program message. */
  static String closingProgram = "Closing program...";
  /** Server changing message. */
  static String serverChange = "Changing server to: ";
  

  /**
   * This method will do the actual work and return the output.
   * 
   * @param args The arguments that will be given to the command
   * @return A String with the command's output
   */
  public abstract String doCommand(List<String> args);

}
